package com.yuan.generatorcode.bean;

import java.util.List;

/**
 * 数据表索引信息
 * @author YouYuan
 * @date 2020/6/20 22:22
 */
public class IndexInfo {

    /**索引名称*/
    private String indexName;
    /**索引类型：PRIMARY KEY | UNIQUE*/
    private String indexType;
    /**索引列*/
    private List<String> indexColumns;
    /**是否唯一索引(不包括主键索引，即主键是false)*/
    private boolean isUnique = false;

    /**索引列的分组形式，例如：NAME,ID_CARD*/
    private String columnsGroup;

    /**索引列的分组字符串形式，例如："NAME","ID_CARD"*/
    private String columnsGroupStr;

    public String getIndexName() {
        return indexName;
    }

    public void setIndexName(String indexName) {
        this.indexName = indexName;
    }

    public String getIndexType() {
        return indexType;
    }

    public void setIndexType(String indexType) {
        this.indexType = indexType;
    }

    public List<String> getIndexColumns() {
        return indexColumns;
    }

    public void setIndexColumns(List<String> indexColumns) {
        this.indexColumns = indexColumns;
    }

    public boolean isUnique() {
        return isUnique;
    }

    public void setUnique(boolean unique) {
        isUnique = unique;
    }

    public String getColumnsGroup() {
        return columnsGroup;
    }

    public void setColumnsGroup(String columnsGroup) {
        this.columnsGroup = columnsGroup;
    }

    public String getColumnsGroupStr() {
        return columnsGroupStr;
    }

    public void setColumnsGroupStr(String columnsGroupStr) {
        this.columnsGroupStr = columnsGroupStr;
    }

    @Override
    public String toString() {
        return "IndexInfo{" +
                "indexName='" + indexName + '\'' +
                ", indexType='" + indexType + '\'' +
                ", indexColumns=" + indexColumns +
                ", isUnique=" + isUnique +
                '}';
    }
}
